<header >
    <div  ng class="header-title" translate="N004539">
        上传报告文件
    </div>

    <div class="header-yindao">
        <span ng-if="!vm.item.fileType.dataValue" translate="N004540">选择报告类型</span>
        <span ng-if="vm.item.fileType.dataValue">{{vm.item.fileType.dataValue}}</span>

        <span ng-if="vm.item.fileType.dataValue" class="file-icon-container">
            <span class="svg-icon-img ydright-icon-span-img">
            </span>
        </span>
        <span ng-if="vm.item.fileType.dataValue&&vm.guideFlag.FILE_DATE==false" translate="N004541">选择报告时间</span>
        <span ng-if="vm.guideFlag.FILE_DATE==true&&vm.item.year">

            <span ng-if="vm.item.fileType.dataCode=='001'&&vm.item.fileFirstType.dataCode=='003'"
                  translate="N004526"
                  translate-values="{vcReportDateSec:(vm.item.year | year)}">
                {{vm.item.year | year}}年报
            </span>
            <span  ng-if="vm.item.fileType.dataCode=='001'&&vm.item.fileFirstType.dataCode=='004'"
                   translate="N004527"
                   translate-values="{vcReportDateSec:(vm.item.year | year),vcReportDateThird:(vm.item.quarter | quarter)}">
                {{vm.item.year | year}}年第{{vm.item.quarter | quarter}}季报告
            </span>
            <span ng-if="vm.item.fileType.dataCode=='001'&&vm.item.fileFirstType.dataCode=='005'"
                  translate="N004528"
                  translate-values="{vcReportDateSec:(vm.item.year | year),vcReportDateThird:(vm.item.month | month)}">
                {{vm.item.year | year}}年{{vm.item.month | month}}月报告
            </span>
            <span ng-if="vm.item.fileType.dataCode=='002'">
                {{item.vcReportDateThird|mFormat:'YYYY年MM月DD日'}}
            </span>

            <!--{{vm.item.year | year}}{{vm.item.fileFirstType.dataValue}}{{(vm.item.quarter?vm.item.quarter:'') | quarter}}{{(vm.item.month?vm.item.month:'') | month}}-->
        </span>
        <span ng-if="vm.guideFlag.FILE_DATE==true&&!vm.item.year">{{vm.item.filedate | mFormat:'YYYY年MM月DD日'}}</span>

        <span ng-if="vm.guideFlag.FILE_DATE==true" class="file-icon-container">
            <span class="svg-icon-img ydright-icon-span-img">
            </span>
        </span>
        <span ng-if="vm.guideFlag.FILE_DATE==true" translate="N001529">选择文件</span>
    </div>
</header>
<section class="file-upload">
    <form id="fileUploadForm" name="fileUploadForm" class="form-default">

            <div ng-if="vm.guideFlag.FILE_DATE==false" class="control-group" style="margin-left: 20px;">
                <div class="row-fluid">
                    <div class="span12">
                        <label class="control-label required" translate="N004538">报告类型</label>
                        <div class="controls">
                            <select ng-disabled="vm.guideFlag.FILE_TYPE==true" name="fileType" class="span12 fx-select" ng-model="vm.item.fileType"
                                    ng-options="fileType as fileType.dataValue for fileType in vm.dictionary.fileTypes"
                                    ng-change="vm.selectFileType()" validator="required">
                                <option value="" translate="N000037">---请选择---</option>
                            </select>
                        </div>
                    </div>
                </div>

                <div class="row-fluid" ng-if="vm.item.fileType.dataValue">
                    <div class="span4" ng-if="vm.item.fileType.dataCode=='001'">
                        <label class="control-label required" translate="N004534">报告时间</label>
                        <div class="controls">
                            <select ng-disabled="vm.guideFlag.FILE_DATE==true" name="fileFirstType" class="span12 fx-select" ng-model="vm.item.fileFirstType"
                                    ng-options="fileFirstType as fileFirstType.dataValue for fileFirstType in vm.dictionary.fileFirstTypes"
                                    ng-change="vm.selectFirstType()" validator="required">
                                <option value="" translate="N000037">---请选择---</option>
                            </select>
                        </div>
                    </div>

                    <div class="span4" ng-if="vm.item.fileType.dataCode=='001'&&vm.item.fileFirstType.dataCode">
                        <label class="control-label" >&nbsp;</label>
                        <div class="controls">
                            <div class="input-append">
                                <input ng-disabled="vm.guideFlag.FILE_DATE==true" type="text" class="span12" placeholder="{{'N001026' | translate}}"
                                       ng-model="vm.item.year"
                                       date-time format="YYYY" view="year" min-view="year"
                                       name="year"
                                       validator="required"
                                       valid-method="blur"/>
                                <span class="add-on" style="border:none;border-radius: inherit;">
                                    <i class="icon icon-calendar"></i>
                                </span>
                            </div>
                        </div>
                    </div>

                    <div class="span4" ng-if="vm.item.fileType.dataCode=='001'&&(vm.item.fileFirstType.dataCode=='004'||vm.item.fileFirstType.dataCode=='005')">
                        <label class="control-label" >&nbsp;</label>
                        <div class="controls">
                            <select ng-if="vm.item.fileFirstType.dataCode=='004'" ng-disabled="vm.guideFlag.FILE_DATE==true"
                                    name="quarter" class="span12 fx-select" ng-model="vm.item.quarter"
                                    ng-options="quarter.dataCode as quarter.dataValue for quarter in vm.dictionary.quarters"
                                    validator="required">
                                <option value="" translate="N000037">---请选择---</option>
                            </select>

                            <div class="input-append jx-wrapper" ng-if="vm.item.fileFirstType.dataCode=='005'">
                                <input ng-disabled="vm.guideFlag.FILE_DATE==true" type="text" class="span12" placeholder="{{'N001026' | translate}}"
                                       ng-model="vm.item.month"
                                       date-time format="MM" view="month" min-view="month"
                                       name="month"
                                       validator="required"
                                       valid-method="blur"/>
                                <span class="add-on" style="border:none;border-radius: inherit;">
                                    <i class="icon icon-calendar"></i>
                                </span>
                            </div>
                        </div>
                    </div>

                    <div class="span4" ng-if="vm.item.fileType.dataCode=='002'">
                        <label class="control-label required" translate="N004534">报告时间</label>
                        <div class="controls">
                            <div class="input-append" >
                                <input ng-disabled="vm.guideFlag.FILE_DATE==true" id="filedate" type="text" class="span12" placeholder="{{'N001026' | translate}}"
                                       ng-model="vm.item.filedate"
                                       date-time format="YYYY-MM-DD" view="date" min-view="date"
                                       name="filedate"
                                       validator="required"
                                       valid-method="blur"/>
                                <span class="add-on" style="border:none;border-radius: inherit;">
                                    <i class="icon icon-calendar"></i>
                                </span>
                            </div>
                        </div>
                    </div>
                </div>

                <!--标的名称-->
                <!--文件到标的级别的，才显示这部分-->
                <div class="upload-tips" data-spy="scroll" data-target="#vcManagePlan" data-offset="-200">
                    <label class="control-label" translate="N004542">温馨提示:</label>
                    <div class="controls">
                        <p class="ng-binding" style="min-height: 14px;line-height: 14px;border-bottom:0px;" translate="N004543">1、每份上传文件的大小不能超过50M</p>
                        <p class="ng-binding" style="min-height: 14px;line-height: 14px;border-bottom:0px;" translate="N004544">2、支持多种文件格式：.doc,.docx,.xls,.xlsx,.pdf</p>
                    </div>
                </div>
            </div>

            <div ng-if="vm.guideFlag.FILE_DATE==true&&vm.guideFlag.SELECT_FILE==false" class="control-group" style="margin-left: 20px;">
                <div class="upload-btn-container">
                    <div class="upload-btn-title"><span translate="N004545">上传一个或多个文件</span></div>
                    <div style="width: 100%" fx-uploader="vm.options" range="true" on-select="vm.onSelect" on-complete="vm.onComplete" on-queue-complete="vm.unlockPage"></div>
                </div>

                <!--标的名称-->
                <!--文件到标的级别的，才显示这部分-->
                <div class="upload-tips" data-spy="scroll" data-target="#vcManagePlan" data-offset="-200">
                    <label class="control-label" translate="N004542">温馨提示:</label>
                    <div class="controls">
                        <p class="ng-binding" style="min-height: 14px;line-height: 14px;border-bottom:0px;" translate="N004543">1、每份上传文件的大小不能超过50M</p>
                        <p class="ng-binding" style="min-height: 14px;line-height: 14px;border-bottom:0px;" translate="N004544">2、支持多种文件格式：.doc,.docx,.xls,.xlsx,.pdf</p>
                    </div>
                </div>
            </div>

            <div ng-if="vm.guideFlag.FILE_DATE==true&&vm.guideFlag.SELECT_FILE==true" class="upload-file-list control-group">
                <!--文件列表-->
                <div class="row-fluid">
                    <div class="fl selected-files"><span translate="N004546">已选择的文件</span></div>
                    <div class="fr continue-uploader" fx-continue-uploader="vm.options"  range="true" on-select="vm.onSelect" on-complete="vm.onComplete" on-queue-complete="vm.unlockPage"></div>
                </div>
                <div class="row-fluid waiting-file-list" style="width: 840px;">
                    <table class="table table-hover main-table" style="margin-bottom: 0px;">
                        <tbody>
                        <tr  ng-repeat="waitfile in vm.WaitUpload">
                            <td  class="file-name-td ellipsis" style="width: 420px;" ng-click="vm.Preview(waitfile)">
                                <span class="file-icon-container" >
                                    <span class="{{waitfile.vcType|fileType}}-icon-img"></span>
                                </span>
                                {{waitfile.vcDocName}}
                            </td>
                            <td class="lastTD">
                                <div>
                                    <span class="file-icon-container" style="margin-right: 17px;">
                                        <span class="edit-icon-img" ng-click="vm.rename($index,waitfile)">

                                        </span>
                                    </span>
                                    <span class="file-icon-container">
                                        <span class="delete-icon-img" ng-click="vm.deleteFile($index,waitfile.fileId)">

                                        </span>
                                    </span>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>

                </div>
            </div>
    </form>
</section>
<!--<footer>
    <button ng-if="vm.guideFlag.FILE_TYPE!=false" class="btn btn-primary fl" ng-click="vm.previous()">上一步</button>
    <button ng-if="!(vm.guideFlag.FILE_DATE==true||(vm.guideFlag.FILE_DATE==true&&vm.guideFlag.SELECT_FILE==true))" class="btn btn-primary fl" ng-click="vm.next(fileUploadForm)">下一步</button>
    <button ng-if="vm.guideFlag.FILE_DATE==true||(vm.guideFlag.FILE_DATE==true&&vm.guideFlag.SELECT_FILE==true)" class="btn btn-primary fl" ng-class="{disabled:!vm.guideFlag.SELECT_FILE}" ng-click="vm.guideFlag.SELECT_FILE?vm.save():t=1">上传</button>
    <button class="btn fr" ng-click="vm.Close()" >取消</button>
</footer>-->
<footer ng-if="vm.guideFlag.FILE_DATE==false">
    <button ng-if="!(vm.guideFlag.FILE_DATE==true||(vm.guideFlag.FILE_DATE==true&&vm.guideFlag.SELECT_FILE==true))" class="btn btn-primary fl" ng-click="vm.next(fileUploadForm)" translate="N004547">下一步</button>
    <button class="btn fr" ng-click="vm.Close()" translate="N000992">取消</button>
</footer>
<footer ng-if="vm.guideFlag.FILE_DATE==true&&vm.guideFlag.FILE_DATE==true">
    <button ng-if="vm.guideFlag.FILE_TYPE!=false" class="btn btn-primary fl" ng-click="vm.previous()" translate="N004548">上一步</button>
    <button ng-if="vm.guideFlag.FILE_DATE==true||(vm.guideFlag.FILE_DATE==true&&vm.guideFlag.SELECT_FILE==true)" class="btn btn-primary fl" ng-class="{disabled:!vm.guideFlag.SELECT_FILE}" ng-click="vm.guideFlag.SELECT_FILE?vm.save():t=1" translate="N004108">上传</button>
    <button class="btn fr" ng-click="vm.Close()" translate="N000992">取消</button>
</footer>

<div id="FullPageLock" style="display:none">
    <table style="width: 100%;height: 100%;">
        <tbody>
        <tr>
            <td style="text-align: center;">
                <span class="upload-tip"
                      translate="N004549"
                      translate-values="{selectFiles:vm.selectFiles,finishFiles:vm.finishFiles}">
                    共选择:<span class="upload-tip-word">{{vm.selectFiles}}</span>个文件,
                    已上传:<span class="upload-tip-word">{{vm.finishFiles}}</span>个文件
                </span>
                <br>
                <br>
                <img ng-src="styles/img/loading2.gif">
            </td>
        </tr>
        </tbody>
    </table>
</div>